<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>06_JS函数</title>
</head>
<body>
<script>
    function f1() {
        console.log("f1启动");
    }

    f1();

    function f2(n) {
        console.log('f2启动');
        console.log(n);
    }

    f2(10);
    f2(false);
    f2('hahaha')

    function f3(a, b) {
        console.log('f3启动');
        console.log(a + b);
    }

    f3(4, 5)
    f3(4, 5, 6)
    f3(4)

    function f4(x, y) {
        console.log('f4启动')
        return x * y;
    }

    var res = f4(2, 3);
    console.log(res);
    console.log(f4(3, 3));

    var f5 = function () {
        console.log("匿名函数启动")
    }
    f5();
    console.log(f5);
    console.log(typeof f5);

    const f6 = () => {
        console.log('箭头函数启动')
    }
    f6();
    console.log(f6);
    console.log(typeof f6);
</script>
</body>
</html>